﻿<%@ Page Language="C#" MasterPageFile="~/Template/List.master" AutoEventWireup="true"
    CodeFile="MyTrainClassList.aspx.cs" Inherits="Page_MyTrainClassList" Title="Untitled Page" %>

<%@ Register Src="~/Control/ListHeader.ascx" TagName="ListHeader" TagPrefix="wsc" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">

    

    <script type="text/javascript" src="../Js/jquery-1.2.6.min.js"></script>

    <script type="text/javascript" src="../Js/jquery-1.2.6-vsdoc.js"></script>

    <script type="text/javascript">

        function addClass(userID) {
            var width = 530;
            var height = 580;
            window.open("NewTrainClass.aspx?Nocache=" + Math.random(), "newwindow", 'width=' + width + ',height=' + height + ',toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,left=' + (screen.width - width) / 2 + ',top=' + (screen.height - height) / 2);
        }
        function advancedSearchClick() {
            if (window.event.keyCode == 13) {
                document.getElementById("<%=btnAdvancedSearch.ClientID %>").click();
            }
        }
        function searchClick() {
            if (window.event.keyCode == 13) {
                document.getElementById("<%=btnSearch.ClientID %>").click();
            }
        }

        function clearText(control, text) {
            if (control.value == text)
                control.innerText = "";
        }
        function refresh() {
            document.getElementById("<%=btnRefresh.ClientID %>").click();
        }
        function insertText(control, text) {
            if (control.value == "")
                control.innerText = text;
        }
        function finishClass() {
            document.getElementById("<%=btnFinish.ClientID %>").click();
        }
        function deleteUser() {
            document.getElementById("<%=btnDelete.ClientID %>").click();
        }
        function stopBubble(e, id) {
            var e = e ? e : window.event;
            if (window.event) { // IE   
                e.cancelBubble = true;
            } else { // FF   
                //e.preventDefault();    
                e.stopPropagation();
            }
            OpenDetail('AuditClassMemberDetail.aspx?ClassID=' + id + '&Nocache=' + Math.random());
        }
        
    </script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="TitlePlaceHolder" runat="Server">
    我开设的班级列表
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ListToolBarPlaceHolder" runat="Server">
    <div style="display: none">
        <asp:Button ID="btnRefresh" runat="server" OnClick="btnRefresh_Click" />
        <asp:Button ID="btnDelete" runat="server" OnClick="btnDelete_Click" />
        <asp:Button runat="server" ID="btnFinish" OnClick="btnFinish_Click" />
    </div>
    <table cellspacing="2" cellpadding="0" border="0" width="100%">
        <tr>
            <td class="ToolMenu" width="60">
                <div class="Normal" oldclass="Normal" onmouseover="OverChangeClass(this);" onmouseout="ReturnClass(this)"
                    onclick="addClass();">
                    <span>
                        <img src="../Images/Icon/Object/tz-add.gif" alt="" /></span><span>新建</span>
                </div>
            </td>
            <td class="Fg">
                <img src="../Images/FgLine.gif" alt="" />
            </td>
            <td class="ToolMenu" width="60">
                <div class="Normal" oldclass="Normal" onmouseover="OverChangeClass(this);" onmouseout="ReturnClass(this)"
                    onclick="if(window.confirm('确认删除？'))deleteUser();">
                    <span>
                        <img src="../Images/Icon/Action/delete.gif" alt="" /></span><span>删除</span>
                </div>
            </td>
            <td class="Fg">
                <img src="../Images/FgLine.gif" alt="" />
            </td>
            <td class="ToolMenu" width="60" id="tdAdminTool" runat="server">
                <div class="Normal" oldclass="Normal" onmouseover="OverChangeClass(this);" onmouseout="ReturnClass(this)"
                    onclick="finishClass();">
                    <span>
                        <img src="../Images/Icon/Object/tz-add.gif" alt="" /></span><span>结束班级</span>
                </div>
            </td>
            <td class="Fg" runat="server" id="tdAdminFg">
                <img src="../Images/FgLine.gif" alt="" />
            </td>
            <td>
                <table cellspacing="0" cellpadding="0" border="0" class="TableSearch" width="100%">
                    <tr>
                        <td width="100%">
                            <asp:TextBox ID="tbSearch" runat="server" CssClass="TextBox"></asp:TextBox>
                        </td>
                        <td width="10">
                            <asp:LinkButton ID="btnSearch" runat="server" OnClick="btnSearch_Click"><img alt="<%=SearchDefaultText %>" src="../Images/Icon/Icon-Search.png" align="absmiddle" style="cursor: pointer;" /></asp:LinkButton>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="AdvancedSearchPlaceHolder" runat="server">
    <table cellspacing="4" cellpadding="0" border="0" width="100%">
        <tr>
            <td width="60">
                班级名称
            </td>
            <td>
                <asp:TextBox ID="tbSearchDept" runat="server" class="Textbox01" Width="100%"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td width="60">
                岗位
            </td>
            <td>
                <asp:TextBox ID="tbSearchStation" runat="server" class="Textbox01" Width="100%"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td colspan="2" align="right">
                <asp:Button ID="btnAdvancedSearch" runat="server" CssClass="Button01" Text="查询" OnClientClick=""
                    OnClick="btnAdvancedSearch_Click" />
            </td>
        </tr>
    </table>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="ListHeaderPlaceHolder" runat="Server">
    <table cellspacing="0" cellpadding="0" border="0" class="PageGridHeader" width="100%">
        <wsc:ListHeader Type="CheckBox" ID="cbUser" Align="Center" runat="server" Width="30" />
        <wsc:ListHeader ID="lhGender" runat="server" Title="&nbsp;班级名称" OrderColumn="ClassName" />
        <wsc:ListHeader ID="lhAuditStatus" runat="server" Title="&nbsp;班级状态" Width="80" />
        <wsc:ListHeader ID="lhMember" runat="server" Title="&nbsp;通过人数/报名人数" Width="110" />
    </table>
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="ListContentPlaceHolder" runat="Server">
    <table width="100%" border="0" cellspacing="0" cellpadding="0" class="MainInfolist">
        <asp:Repeater ID="rptUserInfo" runat="server">
            <ItemTemplate>
                <tr id="TableRow_<%# Container.ItemIndex%>" style="cursor: hand; text-align: left;"
                    class="Normal" oldclass="Normal" onmouseover="OverChangeClass(this);" onmouseout="ReturnClass(this)"
                    onclick="ClickChangeClass(this);OpenDetail('ClassDetail.aspx?ClassID=<%# DataBinder.Eval(Container.DataItem, "ID")%>&Nocache=' + Math.random());">
                    <td width="30" align="center">
                        <asp:CheckBox ID="cbUser" runat="server" />
                    </td>
                    <td style="display: none;">
                        <%# DataBinder.Eval(Container.DataItem,"ID") %>
                    </td>
                    <td>
                        <span title='<%# DataBinder.Eval(Container.DataItem, "ClassName")%>'>
                            <%# DataBinder.Eval(Container.DataItem, "ClassName")%></span>
                    </td>
                    <td width="80">
                        <%# DataBinder.Eval(Container.DataItem, "ClassStatus")%>
                    </td>
                    <td width="110">
                        <a href="#" onclick="stopBubble(event,'<%# DataBinder.Eval(Container.DataItem, "ID")%>')">
                            <%# Eval("MemberPassCount") %>/<%# Eval("MemberApplyCount")%></a>
                    </td>
                </tr>
            </ItemTemplate>
        </asp:Repeater>
    </table>
</asp:Content>
